package common.stack.delayStack;

import common.stack.delayStack.two.MyStack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Endstart
 * Date: 2021-05-08
 * Time: 20:20
 */
public class TestMainStack {

    public static void main(String[] args) {
        MyStack<Integer> myStack = new MyStack<>(10);
        for (int i = 1; i <= 30; i++) {
            myStack.push(i);
        }
        for (int i = 0; i < 10; i++) {
            System.out.println(myStack.peek());
            System.out.println(myStack.pop());
        }
        for (int i = 31; i <= 50; i++) {
            myStack.push(i);
        }
        for (int i = 0; i < 10; i++) {
            System.out.println(myStack.peek());
            System.out.println(myStack.pop());
        }
    }
}
